empty-checks if a variable is empty
Report a bug description
BOOL Empty (mixed $var)
If Var is a non-null or nonzero value, empty () returns FALSE. In other words, "", 0, "0", NULL, FALSE, Array (), Var $var; and objects that do not have any
empty-checks if a variable is empty
Report a bug description
BOOL Empty (mixed $var)
If Var is a non-null or nonzero value, empty () returns FALSE. In other words, "", 0, "0", NULL, FALSE, Array (), Var $var; and objects that do not have any
empty-Check if a variable is empty
Statement a bug description
BOOL Empty (mixed $var)
Empty () returns FALSE if Var is a non-null or Non-zero value. In other words, "", 0, "0", NULL, FALSE, Array (), Var $var; and objects that do not have any
Solution Objective: determine if a variable is empty
This article has compiled some commonly used in PHP, the judgment variable is empty method, shares to everybody.1,isset function : Determine whether the variable is initializedDescription:
Empty-check whether a variable is empty
Report a bug description
Bool empty (mixed $ var)If var is a non-null or non-zero value, empty () returns FALSE. In other words, "", 0, "0", NULL, FALSE, array (), var $ var; and objects without any
Phpempty () checks whether a variable is empty. Empty-check whether a variable is null Reportabug description boolempty (mixed $ var) if var is not null or a non-zero value, empty () returns FALSE. In other words, 0, 0,
Empty-check whether a
Can empty () replace isset () When php checks whether a variable is set ?. Let's first review empty and issetempty to check whether a variable is empty, 0, 0, NULL, FALSE, array (), var $ var; and objects without any attributes will be considered
Gettype: Get the type of the variable.Intval: convert a variable to an integer.Doubleval: convert a variable to a Double Floating Point.Empty: determines whether the variable is configured.Is_array: determines whether the variable type is an array
Empty () only detects variables, and any non-variables will cause parsing errors. In other words, the following statement does not work: empty (addslashes ($ name ))
Empty () only detects variables, and any non-variables will cause parsing errors.
Let's go over the empty and isset empty-check if a variable is empty "", 0, "0", NULL, FALSE, Array (), Var $var; and objects that do not have any properties will be considered empty, and if VAR is null, returns TRUE if the isset-detects whether the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.